// 写作中心页面整体布局设置
@import "../../../css/common-var";
.container-fluid {
  position: relative;
  height: calc(~"100vh - 60px");
  max-width: 100%;

  .scrollbar-visible {
    height: 100%;

    .layout-mode-fixed {
      height: 100%;
      position: relative;
    }

    // 编辑器工具栏区（内部group-item需要在首页index进行设置）
    .editor-toolbar {
      position: relative;
      top: 0;
      left: 0;
      z-index: 5;
      padding: 0 57px;
      margin: 0 auto;
      border-top: none;
      border-bottom: none;

      /deep/ .editor-toolbar-content {
        width: auto;
        position: relative;
        display: flex;
        height: 50px;
        color: #585A5A;
        justify-content: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        border-bottom: 1px solid @border-color_normal;

        .editor-toolbar-group {
          position: relative;
          border-left: none;
          padding: 4px 6px;
        }

        .editor-toolbar-group:not(:first-child):after {
          content: '';
          position: absolute;
          left: 0;
          right: 0;
          height: 30px;
          width: 1px;
          background: @border-color_normal;
        }

        .toolbar-dropdown {
          display: flex;
          align-items: center;
        }
      }
    }

    // 编辑器内容区
    .editor-body {
      height: calc(~"100% - 50px");
      position: relative;

      // 左边文档内容
      .editor-wrap {
        display: flex;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        position: relative;
        overflow-anchor: none;

        .editor-wrap-content {
          flex: 1;
          min-width: 500px;

          .editor-outer-wrap-box {
            min-width: 500px;
            padding-bottom: 1px;

            .editor-wrap-box {

              .title-box {
                position: relative;
                padding: 0 70px;
                margin: 0 auto;

                .title-editor {
                  margin-top: 33px;
                  font-family: Chinese Quote, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji;
                  position: relative;
                  padding-bottom: 4px;

                  .title {
                    font-weight: 700;
                    font-size: 36px;
                    max-height: 350px;
                    min-height: 32px;
                    // 此处表示font-size*1.389得到行高
                    line-height: 1.389;
                    max-width: 100%;
                    width: 100%;
                    resize: none;
                    border: none;
                    outline: none;
                    -webkit-box-shadow: none;
                    box-shadow: none;
                    padding: 0;
                    margin: 0;
                    vertical-align: bottom;
                    transition: all .3s, height 0s;
                    font-variant: tabular-nums;
                    list-style: none;
                    font-feature-settings: "tnum";
                    position: relative;
                    display: inline-block;
                    background-color: var(--theme--color);
                    background-image: none;
                    border-radius: 4px;
                    overflow-x: hidden;
                    overflow-y: hidden;

                    // 设置placeholder字体颜色
                    textarea::-webkit-input-placeholder { /* WebKit browsers */
                      color: #BFBFBF;
                    }

                    textarea::-moz-placeholder { /* Mozilla Firefox 4 to 18 */
                      color: #BFBFBF;
                    }

                    textarea::-moz-placeholder { /* Mozilla Firefox 19+ */
                      color: #BFBFBF;
                    }

                    textarea::-ms-input-placeholder { /* Internet Explorer 10+ */
                      color: #BFBFBF;
                    }
                  }
                }
              }
              .title-standard-wide {
                max-width: 890px;
              }
              .title-ultra-wide {
                margin-right: 280px;
              }


              .content-box {
                position: relative;

                .engine-box {
                  position: relative;
                  overflow-anchor: none;

                  .engine {
                    padding: 20px 70px 90px 70px;
                    min-height: 820px;
                    line-height: 1.74;
                    font-size: 15px;

                    position: relative;
                    z-index: 1;
                    outline: none;
                    white-space: pre-wrap;
                    white-space: break-spaces;
                    word-break: break-word;
                    word-wrap: break-word;
                    font-variant-ligatures: none;
                    --link-color: #117CEE;

                    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Segoe UI';
                    letter-spacing: initial;

                    .doc-editor {
                      margin-left: auto;
                      margin-right: auto;
                      padding-bottom: 40px;
                      background-color: unset;
                    }
                    .editor-standard-wide {
                      max-width: 750px;
                    }
                    .editor-ultra-wide {
                      margin-right: 280px;
                    }
                  }
                }
              }
            }
          }
        }
      }

      // 右边的大纲
      .editor-sidebar {
        position: fixed;
        z-index: 99;
        right: 10px;
        top: 75px;
        width: 16%;
        height: calc(76vh);
        overflow-y: auto;
        overflow-x: hidden;

        .editor-view {
          position: relative;
          z-index: 1;
          max-height: calc(90%);
          display: flex;
          flex-shrink: 0;
          flex-direction: column;
          margin-top: 35px;
          overflow: hidden;
          font-family: 'Chinese Quote', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;

          .editor-toc-pin {
            margin-bottom: 12px;
            padding-top: 8px;
            padding-left: 25px;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            height: 30px;
            -ms-flex-negative: 0;
            flex-shrink: 0;

            .main-point {
              margin-right: 6px;
            }

            .editor-toc-pin-text {
              margin-right: 8px;
              font-weight: bold;
            }
          }

          .editor-toc-inner {
            width: 100%;
            cursor: default;
            overflow-x: hidden;
            overflow-y: auto;

            .toc-content {
              position: relative;
              z-index: 2;

              .toc-item {
                padding-right: 20px;
                height: 22px;
                font-size: 14px;
                line-height: 22px;
                margin-bottom: 6px;
                white-space: nowrap;
                border-left: 2px solid transparent;
                cursor: pointer;
                display: block;

                a {
                  color: #585A5A;
                }
              }

              .toc-item:last-child {
                margin-bottom: 0;
              }

              .toc-depth-1 {
                padding-left: 26px;
              }

              .toc-depth-2 {
                padding-left: 43px;
              }

              .toc-depth-3 {
                padding-left: 60px;
              }

              .toc-depth-4 {
                padding-left: 77px;
              }

              .toc-depth-5 {
                padding-left: 112px;
              }

              .toc-depth-6 {
                padding-left: 128px;
              }



              .toc-selected {
                border-left-color: @primary-color;
                color: @dark-font-color;
                font-weight: bold;
              }

              .toc-item-inner {
                display: flex;
                align-items: center;
                cursor: pointer;

                .toc-item-text {
                  overflow: hidden;
                  text-overflow: ellipsis;
                  display: block;
                }
              }
            }

            .toc-content::after {
              content: ' ';
              background: #D8DAD9;
              width: 2px;
              height: 100%;
              position: absolute;
              top: 0;
              left: 0;
              z-index: -1;
            }
          }
        }
      }
    }
  }

  .back-top {
    position: absolute;
    z-index: 999;
    bottom: 50px;
    right: 50px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,1);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);

    .to-top {
      border-radius: 50%;
      margin-left: 7.5px;
      font-size: 33px;
      color: @light-font-color;
    }

    &:hover {
      background: @dropdown-item-hover;

      .to-top {
        color: @dark-font-color;
      }
    }
  }

  .enable-background-backTop {
    background: var(--theme-color);
    box-shadow: 0 0 6px var(---border-color);

    .to-top {
      color: var(--font-color);
    }
    &:hover {
      background: var(--dropdown-item-hover);

      .to-top {
        color: var(--font-color);
      }
    }
  }
}

// 第三方插件样式覆盖
/deep/ .data-link-editor {
  p {
    .ant-input:focus {
      border-color: #00AE9D;
      box-shadow: none !important;
    }
    .ant-input:hover {
      border-color: #00AE9D;
    }
  }
}

/deep/ .data-toolbar-group .table-color-dropdown-trigger {
  button {
    height: 28px;
    display: flex;
    align-items: center;
  }
}

/deep/ .data-toolbar-group .data-toolbar-item {
  .data-toolbar-btn {
    justify-content: center;
  }
}
